Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix writable changes #4525

Merged
merged 5 commits into from
Oct 11, 2024

Conversation

greg-rychlewski
Copy link
Member

@greg-rychlewski greg-rychlewski commented Oct 11, 2024

Closes #4524

The complexity comes from the fact that we want changes in virtuals to show up in the returned struct but not changes in read-only fields. So we need to filter twice: once to remove read only fields but not virtuals. And then right before the db operation to filter out virtuals again.

lib/ecto/repo/schema.ex Outdated Show resolved Hide resolved
@greg-rychlewski greg-rychlewski merged commit 0d2a56e into elixir-ecto:master Oct 11, 2024
6 checks passed
@greg-rychlewski greg-rychlewski deleted the writable_fixes branch October 11, 2024 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

field/3's :writable seems to ignore the :insert option
2 participants